<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function fn1() {
        console.log("具名函数");
      }

      fn1();
      let fn2 = function () {
        console.log("匿名函数");
      };

      fn2();
      let fn3 = () => {
        console.log("箭头函数");
      };

      fn3();

      function printInfo(name, gender = "man", ...args) {
        console.log(name);
        console.log(gender);
        console.log(args);
      }

      printInfo("小红", 1, 2, 3, "a", "b", "c", "d", "e"); // 小红 1 [2, 3]
    </script>
  </body>
</html>
